package win.demonlegion.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import win.demonlegion.mapper.SysAuthorityMapper;
import win.demonlegion.module.SysAuthorityBean;
import win.demonlegion.service.inte.SysAuthorityService;

import java.util.List;

@Service("sysAuthorityService")
public class SysAuthorityServiceImpl implements SysAuthorityService {
    private static final Logger logger = LoggerFactory.getLogger(SysAuthorityServiceImpl.class);

    @Autowired
    private SysAuthorityMapper sysAuthorityMapper;

    @Override
    public int count() {
        return sysAuthorityMapper.count();
    }

    @Override
    public List<SysAuthorityBean> findAll() {
        return sysAuthorityMapper.findAll();
    }

    @Override
    public SysAuthorityBean selectById(String id) {
        return sysAuthorityMapper.selectById(id);
    }

    @Override
    public SysAuthorityBean selectByAuthority(String authority) {
        return sysAuthorityMapper.selectByAuthority(authority);
    }

    @Override
    public int add(SysAuthorityBean sysAuthorityBean) {
        return sysAuthorityMapper.add(sysAuthorityBean);
    }
}
